package br.uesc.newigrafu.dominio;

import br.uesc.newigrafu.dominio.raf.Reconstrucao;
import java.util.HashSet;
import java.util.Set;

public class NewIGrafu {

    static Set<Reconstrucao> reconstrucoes = new HashSet<Reconstrucao>();

    public NewIGrafu() {
        System.out.println("NewIGrafu criado!");
    }

    public void novaReconstrucao(String entrada, String saida) {
        reconstrucoes.add(new Reconstrucao(entrada, saida));
    }

    public static int getID() {
        return reconstrucoes.iterator().next().hashCode();
    }

    public void atribuiSequencia(int idReconstrucao, String caminhoSequencia) {
        Reconstrucao[] recs = (Reconstrucao[])reconstrucoes.toArray();
        Reconstrucao rec = recs[idReconstrucao];
        rec.setEntrada(caminhoSequencia);
        System.out.println(rec.getEntrada());
        // Reconstrucao rec = reconstrucoes.
    }

}
